package umt.cs.cs241assignment2.c_2_2;

import umt.cs.cs241.assignment2.r_2_6.Progression;
import umt.cs.cs241assignment2.*;

public class AbsValueProgression extends Progression{
	
	long prev;
	long second;
	
	public AbsValueProgression(){
		first = 2;
		second = 200;
		prev = second;
	}
	
	public AbsValueProgression(long value1, long value2) {
		first = value1;
		second = value2;
		prev = second;
	}
	
	protected long firstValue(){
		cur = second - first;
		return cur;
	}
	
	protected long nextValue(){
		cur = cur - prev;
		prev = Math.abs(cur);
		return prev;
	}

}
